Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(EmptyDetailsView): add component #65

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adamviktora
Copy link
Collaborator

@adamviktora adamviktora commented Nov 22, 2024

Closes #26

direct link to new docs: https://ai-infra-ui-components-pr-65.surge.sh/ai-infra-ui-components/emptydetailsview

Issues:

  • cannot add props to EmptyStateHeader (it is now an internal component in Patternfly), thus data-testid="empty-state-title" must be removed, might be worth opening an issue in pf-react?

@patternfly-build
Copy link

patternfly-build commented Nov 22, 2024

- using "type" with Omit instead of "interface" doesn't work for some reason with docs-framework
Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard for me to gage how inconvenient it'll be that the test-id is not exposed any more. Once they migrate to PF6, they will have to cross that bridge themself if they decide it matters, so for now, I think it's okay to not worry about that one item in the hidden component.

/** Source path to an icon image. */
iconImage?: string;
/** Alternative text for icon image if image can't load. */
imageAlt?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need alt text for this image? This image is purely decorative and doesn't provide any additional meaning to the user that isn't already provided with the contents on the page.

/** Button which initiates the creation. */
createButton?: React.ReactNode;
/** Extra children to render inside EmptyStateFooter. */
footerExtraChildren?: React.ReactNode;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example provided in the preview shows an empty state with just a single primary action, but it would be good to have an example that shows a secondary action, too.

title="Start by adding cluster storage"
description="Cluster storage saves your project’s data on a selected cluster. You can optionally connect cluster storage to a workbench."
iconImage={clusterImage}
imageSize="240px"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change 240px to 320px

Also, this size is different than the size shown in /EmptyDetailsView/EmptyDetailsView.tsx below, which is using 320px.

We have new guidelines for empty states that recommend using 320px for illustrations. It would be ideal if our examples in the preview use the values we are recommending.

@jgiardino
Copy link
Collaborator

Overall this looks good. I did have a few requests regarding the preview examples, and one question about image alt text that would be good to get someone else's opinion on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EmptyDetailsView - migrate from ODH and document API
4 participants